﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TTEngine;

namespace TorchesTombs
{
    public class PrimarySpriteSource : SpriteSource
    {
        //This is the primary source
        public override bool IsPrimarySource
        {
            get
            {
                return true;
            }
        }

        //create a specific type of sprite
        public override object CreateSprite(MapObject mo)
        {
            switch (mo.ObjectName)
            {
                case "Door":
                    return new DoorSprite(mo as Door);
                case "Fire":
                    return new FireSprite(mo, 5);
                case "Oil Pool":
                    return new PoolSprite(mo, Color.Yellow);
                default:
                    return null;
            }
        }

        //return a vanilla sprite
        public override object CreateSpriteAsPrimarySource(MapObject mo)
        {
            return new MapObjectSprite(mo);
        }
    }
}
